from simpy import Resource, Environment

from x_pc.core import Device
from x_pc.core.carry import Carry


class DDJ(Carry):
    """
    101 堆垛机
    堆垛机(DDJ)
    """
    # 资源
    resource: Resource = None

    def __init__(self, env: Environment, name: str, kwargs):
        self.resource = Resource(env)
        Device.__init__(self, env, name)
        Carry.__init__(self, env, name, kwargs)

    def cost(self, loc) -> int:
        """
        由上层(system_zb)直接读数据，不在此次计算
        :param loc:
        :return:
        """

    @staticmethod
    def device_type() -> int:
        return 101
